#! /bin/sh
# The folowing shell generates 126 CMP gathers, each with 125 traces

##############################################
# use either positive or negative dips below

# positive (clockwise) dips
#REF1="1.0:-5,0.2;5,0.2"
#REF2="1.0:-0.5495,0;5,2.0199"
#REF3="1.0:-0.2384,0;5,4.3955"
#REF4="1.0:-0.1155,0;5,8.8603"
#REF5="1.0:-0.1763,0;5,29.3564" 

# negative (counterclockwise) dips
REF1="1.0:-1,0.2;4,0.2"
REF2="1.0:-2,2.0199;3.5495,0"
REF3="1.0:-2,4.3955;3.2384,0"
REF4="1.0:-2,8.8603;3.1155,0"
REF5="1.0:-2,29.3564;3.1763,0" 
##############################################


gamma=0.5 # velocity ratio 
dvdz=0.75  # velocity gradient (dv/dz)
v00=5.0  # P-wave velocity at surface (S-wave velocity for GAMM>>1) in km/s
nxo=125   # number of traces per CMP gather
fxo=0 dxo=.016 

# default is to make 1 cdp gathers. 
#nxm=126 fxm=1.000 dxm=0.008 # to make 126 cdp gathers
nxm=1 fxm=1.000 dxm=0.008 # to make 126 cdp gathers

nt=751 dt=0.004 fpeak=20 tmin=.25

susynlvcw 	gamma=$gamma sp=0 v00=$v00 ndpfz=10 dvdz=$dvdz \
dt=$dt nt=$nt fpeak=$fpeak tmin=$tm verbose=1 \
ref=$REF1 ref=$REF2 ref=$REF3 ref=$REF4 ref=$REF5 \
nxo=$nxo fxo=$fxo dxo=$dxo \
nxm=$nxm fxm=$fxm dxm=$dxm  > data.seis

# plot velocity profile
suxmovie < data.seis -geometry 600x600+0+0 \
	perc=99 \
	label1="Time (s)" label2="Trace number." \
	title="Synthetic Mode Converted Data" &

exit 0
